Database4DServer Class

Use to open a 4th Dimension/4D Server data source. Database4DServer supports 4D Server version 6.8 and above and 4D 2003 and above.

Events

None

Properties

Task


Methods

None

More information available in parent classes: Database:Object


Notes

In order to use this class, you must install the 4D database plug-in in your plugins folder, which is available at the REALbasic web site. There are separate versions of the plug-in for Windows and Macintosh. You can cross-compile from the Macintosh but not from Windows.

The 4D plug-in is not supported on Windows 98/ME; it may cause the REALbasic IDE to crash on launch.

4DOpen.dll is required for built Windows applications. Copy the 4DOpen.DLL file (provided with the Windows version of the plug-in) into the same directory as your application. This will ensure that the application can find this library and that the proper version of the library is used.

The set of database plug-ins is included on the REALbasic CD, but you may find more recent versions at the REAL Software web site, http://www.realsoftware.com.

When the 4D plug-in is installed, the Add Data Source menu item in the File menu of the IDE contains an submenu item for 4D Server. When you choose this menu item, a dialog box is presented, enabling you to choose a 4D Server on the network.

To access 4D Server, it must be configured to allow 4D Open connections and the user username must be in the group that has 4D Open access.


Example

The following code makes a connection to a 4D Server via TCP/IP.

Dim db as Database4DServer
db = New Database4DServer
db.host = "127.0.0.1"
db.username = "Jimmy"
db.password = "motion"
db.task="DataEntry"
.
If db.connect then
//proceed with database operations.
else
//error connecting
end if

See Also

Database, RecordSet classes.